<!DOCTYPE html>
<html lang="en">
   <head>
      <meta charset="UTF-8">
      <title>对象解构</title>
   </head>
   <body>
      <script>
         let obj = {
            name: '张三',
            age: 18,
            sex: '男',
            address: {
               city: '北京',
               street: '北京市东城区东直门街道'
            }
         }
         let {name, age, sex, address: {city, street}} = obj;
         console.log(name, age, sex, city, street);
      </script>
   </body>
</html>